x86: provide arch_fetch_and_add()
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 8 May 2015 08:59:26 +0000 (10:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 8 May 2015 08:59:26 +0000 (10:59 +0200)
commit2bfc9fc52ce8485fa43e79bbdc32360c74e12fe8
tree5364888d2b36d53c0312d0c8e43a05a1027d9af8
parentd415a81b2245ac4b27f8cbf4e314449ef275333a
x86: provide arch_fetch_and_add()

arch_fetch_and_add() atomically adds a value and returns the previous
value.

This is needed to implement ticket locks.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
xen/include/asm-x86/system.h